import instance from '../../modules/axios.ts';

export function AllRoles(params: any) {
    return instance.get(
        '/roles_all',
        {params: params},
    );
}

export function GetRoles(params: any) {
    return instance.get(
        '/roles',
        {params: params},
    );
}

export function GetRole(params: any) {
    return instance.get(
        '/roles/' + params.id,
    );
}

export function CreateRole(params: any) {
    return instance.post(
        "/roles",
        params,
    );
}

export function UpdateRole(params: any) {
    return instance.put(
        '/roles/' + params.id,
        params,
    );
}

export function DeleteRole(params: any) {
    return instance.delete(
        '/roles/' + params.id,
    );
}